<?php
function do_etat_offre($str)
{
  switch($str) 
  {
   case 'P':
    return "Proposition";
	break;
   case 'A':
    return "Accept&eacute;e";
	break;
   case 'R': 
    return "Refus&eacute;e.";
	break;
  }
}
$sql = new db();
$req = "SELECT Id_Commande, Date_fin_Liv, Date_Commande, en.GLN_Entrepot AS gln_ent, Nom, fmp.Raison_Social AS fmp_rs, fmp.GLN_FMP AS gln_fmp FROM entrepot AS en, fmp, commande AS co WHERE co.Id_Commande = ".$_GET['idcom']." AND co.GLN_Client = en.GLN_Entrepot AND co.GLN_Entrepot = fmp.GLN_FMP";
$sql->query($req);
$res = $sql->fetch_array();
$req = "SELECT Quantite, li.Id_colis, Description FROM ligne_commande AS li, colis_type as co WHERE li.Id_commande = ".$_GET['idcom']." AND li.Id_colis = co.Id_colis";
$sql->query($req);
$res_col = $sql->fetch_array();
$req = "SELECT * FROM offre_transport WHERE Id_Commande=".$_GET['idcom'];
		$sql->query($req);
		if ($sql->num_rows() > 0)
			{
				$offres = array();
				while ($tmp = $sql->fetch_array())
					$offres[] = $tmp;
			}
?>